<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="commontaglib"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<html>
<head>
<link rel="stylesheet" href="<%=path%>/css/innerstyle.css"	type="text/css" />
<link rel="stylesheet" type="text/css" media="screen"	href="<%=path%>/css/ui-lightness/jquery-ui-1.8.23.custom.css" />

<script type="text/javascript" src="<%=path%>/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery-ui-1.8.23.custom.min.js"></script>
<script type="text/javascript" src="<%=path%>/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>
	<style type="text/css">
html, body {
	margin: 0;			 
	padding: 0;	 
    font-size: 85%;
}
#tab{
	width:99%;	
	padding:0 2px 3px 2px;
	margin:0;
	float:left;
}
#tab h1{
	display:block;
	width:95%;
	height:45px;	
	float:center;
	text-align: center;
	padding-top:5px;
}
#tab h1 span{
	width:250px;
	font:bold 26px/55px Arial, Helvetica, sans-serif;
	color:#fff;
	background-color:#fff;
	display:block;
}
.textbox
{
	width:90px;
	border:#000 1px solid;
}
.textboxs
{
	width:70px;
	border:#000 1px solid;
}
.longtextbox
{
	width:180px;
	border:#000 1px solid;
}
.shorttextbox
{
	width:50px;
	border:#000 1px solid;
}
.shorttextbox1
{
	width:50px;
	border:#000 1px solid;
	background-color:#ddd;
}
.textarea
{
    overflow:auto;	
	border:#000 1px solid;
		
}
.select div {
  border:1px solid #000;
  float: left;
}
label{ display:block; }
fieldset { padding:0; border:0; margin-top:25px; }
label.error {  
        color: red;/*错误信息的颜色*/  
    }  
input.error {  
        border:1px dotted red;/*输入错误的输入框的边框样式*/  
    }		
	
	</style>

</head>
<script type='text/javascript'>
  
  
  	$(function (){
        $("#but2").button();
        $("#but3").button();
  	     buttonclick("#but2",'7');
  	     //checkJg();
	});
	
	function checkJg(){
	var jig = $("#jiag").text();
	//alert(jig);
	var jiglx ="${htinfo.jiaglxmc}";
	var neir =$("#neir2").text();
	var str = "";
	if(jiglx!='' && jiglx!=null){
	    str+=jiglx+":";
	}
	if(jig!='' && jig!=null){
	    str+=jig+"元/吨,"	;
	}
	$("#neir2").text(str+neir);
	}
	
	function buttonclick(but,str){
	$(but).click((function (){
  	 var url= "<%=path%>/htgl/htsp.action";
			$.post(url, {
				htbh : $("#htbh").val(),
				spzt : str
			}, function(data, textStatus) {				
				var json = eval('(' + data + ')');
				if (json.result == "1") {
					alert("操作成功");
					window.returnValue = 1;
					window.close();
				} else {
					alert("操作失败");
				}

			});
		}));
	}
</script>
<body>
	<div id="tab">
		<h1>煤炭交易合同</h1>
		<form name="form2" id="form2">
			<table id="list_search" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td>出卖人（销方）:</td>
					<td>${htinfo.chumdwmc}</td>
					<td>企业合同号:</td>
					<td>${htinfo.hetlrbh}</td>
					<td>出省站/营业站:</td>
					<td>${htinfo.yingyzhmjglz}</td>
				</tr>

				<tr>
					<td>买受人（购方）:</td>
					<td>${htinfo.maisdwmc}</td>
					<td>签约地点:</td>
					<td>中国(太原)煤炭交易中心	</td>
					<td>到达省、地（市）:</td>
					<td>${htinfo.daodssdname}</td>
				</tr>

				<tr>
					<td>合同形式:</td>
					<td>${htinfo.hetxsname}</td>
					<td>价格类型:</td>
					<td>${htinfo.jiaglxmc}</td>
					<td>隶属行业:</td>
					<td>${htinfo.hangylsname}</td>
				</tr>

				<tr>
					<td>发货单位:</td>
					<td>${htinfo.fahdwmc}</td>
					<td>配送方式:</td>
					<td>${htinfo.psfsname}</td>
					<td>签订时间:</td>
					<td>${htinfo.qianysj}</td>

				</tr>
				<tr>
					<td>到达省市:</td>
					<td>${htinfo.daodssdmc}</td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>

				</tr>
				<tr>
					<td colspan="6" style="padding-top:5px;">一、收货人名称、品种规格、数量、单价</td>
				</tr>
				<tr>
					<td colspan="6" style="padding:1px;">
						<table id="changdi" align="center" cellpadding="0" cellspacing="0"
							class="content_gridview" border="1">
							<thead>
								<tr>
									<th rowspan="3">收货人名称</th>
									<th rowspan="3">品种规格</th>
									<th rowspan="3">质量指标</th>
									<th rowspan="3">价格<br/>(元/吨)</th>
									<th colspan="13">交（提）货时间、煤量（吨）</th>

								</tr>
								<tr>
									<th rowspan="2">全年合计</th>
									<th colspan="3">一季度</th>
									<th colspan="3">二季度</th>
									<th colspan="3">三季度</th>
									<th colspan="3">四季度</th>
								</tr>
								<tr>
									<th>1</th>
									<th>2</th>
									<th>3</th>
									<th>4</th>
									<th>5</th>
									<th>6</th>
									<th>7</th>
									<th>8</th>
									<th>9</th>
									<th>10</th>
									<th>11</th>
									<th>12</th>
								</tr>
							</thead>
							<tbody>
								<s:iterator value="htkz" status="i">
									<tr>
										<td>${shouhdwmc}</td>
										<td>${pinzgg}</td>
										<td>${zhilzb}</td>
										<td><div id="jiag"><fmt:formatNumber value="${jiag}" pattern="###.##"/></div></td>
										<td><fmt:formatNumber value="${shul}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml1}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml2}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml3}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml4}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml5}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml6}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml7}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml8}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml9}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml10}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml11}" pattern="###"/></td>
										<td><fmt:formatNumber value="${gml12}" pattern="###"/></td>
									</tr>
								</s:iterator>
							</tbody>
						</table></td>
				</tr>

				<tr>
					<td colspan="6">
						<table id="djtk" cellpadding="0" cellspacing="0" border="0"
							border rules=rows frame=below >

							<s:iterator value="djtk" status="i">
								<tr>
									<td>${tkh}${biaot}</td>
									<td style="width:86%"><div id="neir${i.index}">${neir}</div></td>
								</tr>
							</s:iterator>
						</table></td>
				</tr>
				<tr>
					<td colspan="6">
						<table cellpadding="0" cellspacing="0" style="width:100%"
							class="content_gridview" border="1">
							<thead>
								<tr>
									<th colspan="2">出卖人</th>
									<th colspan="2">买受人</th>									
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>
										<table cellpadding="0" cellspacing="0" border="0"
											class="content1" >
											<tr>
												<td>出卖人名称(章)：</td>
												<td>${htinfo.chumdwmc}</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.chumdwdz}</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.chumdwfddbr}</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.chumdwwtdlr}</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.chumdwdh}</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.chumdwcz}</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.chumdwyzbm}</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.chumdwkhyh}</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.chumdwzh}</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.chumdwnsrdjh}</td>
											</tr>

										</table></td>
									<td><table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>出卖人结算单位名称(章)：</td>
												<td>${htinfo.chumdwjsrmc}</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.chumdwjsrdz}</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.chumdwjsrfddbr}</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.chumdwjsrwtdlr}</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.chumdwjsrdh}</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.chumdwjsrcz}</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.chumdwjsryzbm}</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.chumdwjsrkhyh}</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.chumdwjsrzh}</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.chumdwjsrnsrdjh}</td>
											</tr>

										</table>
									</td>
									<td><table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>买受人名称(章)：</td>
												<td>${htinfo.maisdwmc}</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.maisdwdz}</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.maisdwfddbr}
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.maisdwwtdlr}
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.maisdwdh}</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.maisdwcz}</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.maisdwyzbm}</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.maisdwkhyh}</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.maisdwzh}</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.maisdwnsrdjh}
												</td>
											</tr>

										</table>
									</td>
									<td><table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>买受人结算单位名称(章)：</td>
												<td>${htinfo.maisdwjsrmc}</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.maisdwjsrdz}</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.maisdwjsrfddbr}</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.maisdwjsrwtdlr}</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.maisdwjsrdh}</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.maisdwjsrcz}</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.maisdwjsryzbm}</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.maisdwjsrkhyh}</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.maisdwjsrzh}</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.maisdwjsrnsrdjh}</td>
											</tr>

										</table>
									</td>									
								</tr>
							</tbody>
						</table></td>

				</tr>
				<tr>					
					<td colspan="6" align="right"><font size="2">合同有效期：${htinfo.youxqxkssj} 至 ${htinfo.youxqxjssj}</font>
					</td>
				</tr>
				<tr>
					<td colspan="6" align="center">
					    <input type="hidden" name="ht.hetbh" value="${htinfo.hetbh}" id="htbh"> 
						<input id="but2" type="button" name="" value="撤销" /> &nbsp;&nbsp;&nbsp;
						<input id="but3" type="button" name="" value="关闭" onclick="window.returnValue=1;window.close();" />
					</td>
				</tr>

			</table>
		</form>
	</div>
	<div id="dialog-confirm" title="是否确定？"></div>
</body>
</html>
